<div class="modal-header">
  <div class="modal-title">{{record.id ? ('edit' | translate) : ('add'|translate)}} {{'user'|translate}}</div>
</div>
<form (ngSubmit)="save()" nz-form>
  <nz-form-item>
    <nz-form-label nzXs="24" nzSm="7" nzFor="name" nzRequired>{{'name'|translate}}</nz-form-label>
    <nz-form-control nzXs="24" nzSm="12" nzMd="10">
      <input nz-input [(ngModel)]="record.name" name="name" placeholder="{{'enterName'|translate}}" id="aname">
    </nz-form-control>
  </nz-form-item>
  <nz-form-item>
    <nz-form-label nzXs="24" nzSm="7" nzFor="recordname">{{'account' | translate }}</nz-form-label>
    <nz-form-control nzXs="24" nzSm="12" nzMd="10">
      <input nz-input readonly [(ngModel)]="record.username" name="recordname" placeholder="Auto generate" id="recordname">
    </nz-form-control>
  </nz-form-item>
  <nz-form-item *ngIf="!record.id">
    <nz-form-label nzXs="24" nzSm="7" nzFor="password" nzRequired>{{'password'|translate}}</nz-form-label>
    <nz-form-control nzXs="24" nzSm="12" nzMd="10">
      <input nz-input type="password" [(ngModel)]="record.password" name="password" placeholder="{{'enter'|translate}}{{'password'|translate|lowercase}}" id="password">
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label nzXs="24" nzSm="7" nzFor="linkman">{{'contact'|translate}}</nz-form-label>
    <nz-form-control nzXs="24" nzSm="12" nzMd="10">
      <input nz-input [(ngModel)]="record.linkMan" name="linkman" placeholder="{{'enter'|translate}}{{'contact'|translate|lowercase}}" id="linkman">
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label nzXs="24" nzSm="7" nzFor="tel">{{'tel'|translate}}</nz-form-label>
    <nz-form-control nzXs="24" nzSm="12" nzMd="10">
      <input nz-input [(ngModel)]="record.tel" name="tel" placeholder="{{'enter'|translate}}{{'tel'|translate|lowercase}}" id="tel">
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label nzXs="24" nzSm="7" nzFor="email">{{'email'|translate}}</nz-form-label>
    <nz-form-control nzXs="24" nzSm="12" nzMd="10">
      <input nz-input [(ngModel)]="record.email" name="email" placeholder="{{'enter'|translate}}{{'email'|translate|lowercase}}" id="email">
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label nzXs="24" nzSm="7" nzFor="address">{{'address'|translate}}</nz-form-label>
    <nz-form-control nzXs="24" nzSm="12" nzMd="10">
      <textarea nz-input [(ngModel)]="record.address" name="address" maxlength="120" id="address"></textarea>
    </nz-form-control>
  </nz-form-item>


  <div class="modal-footer">
    <button nz-button type="button" (click)="close()">{{'close' | translate}}</button>
    <button nz-button [nzLoading]="loading" [nzType]="'primary'">{{'save' | translate}}</button>
  </div>
</form>




